import request from '@/utils/request'; 

const access_token  = sessionStorage.getItem('token');
 

//获取  班级列表
export async function getClassList( params?:any) {
    return request('/api2/classMsg/list', {
      headers:{
        access_token
      },  
      params
    });
  } 

//新增班级
export async function addList( params:any){
  return request('/api2/classMsg/add', {
      method:'POST',
      headers:{
        access_token
      }, 
      params:{
        ...params
      }  
    });
}


  //--获取学生列表/studentInfo/importStudentInfo
  export async function GetstudentList( params:any) {
    return request('/api2/studentInfo/importStudentInfo', {
      method:'POST',
      headers:{
        access_token
      }, 
      // params:{
      //   ...params
      // }  
    });
  }

      //查询登录用户所有院系
      export async function getSchoolFacultyList( ) {
        return request('/api2/school/getSchoolFacultyList', {
          headers:{
            access_token
          },
        data:{
          'schoolId':1111
        }   
        });
      }

      //----根据院校id查询院系 
       export async function getSchoolFacultyListBySchoolId(schoolId:string ) {
        return request('/api2/school/getSchoolFacultyListBySchoolId', {
          headers:{
            access_token
          },
         params:{
          schoolId
         }   
        });
      }
      //----获取所属院系
      export async function  getSchoolFacultyListBySchool( params:any) {
        return request('/api2/school/getSchoolFacultyList', {
          headers:{
            access_token
          },   
        });
      }


      //删除班级信息
      export async function deleteClass(ids:number){
        return request('/api2//classMsg/remove',{
          method:'POST',
          headers:{
            access_token
          },
          params:{
            ids
          }
        })
      }

          //更新班级
      export async function addClass (parmas){
        return request('/api2/classMsg/add',{
          method:'POST',
          headers:{
            access_token
          },
          data:parmas
        })
      }


  



 